home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 4 / ETO Development Tools 4.iso / Tools - Objects / Macintosh Programmer’s Workshop / MPW 3.1 / MPW / Interfaces / AStructMacs / Sample.r < prev   
Text File  |  1990-12-13  |  3KB  |  164 lines

  1. /*------------------------------------------------------------------------------
  2.  
  3.       Sample.r    -  Resources for the Sample Application
  4.  
  5.       Copyright Apple Computer, Inc. 1985-1987
  6.       All rights reserved.
  7.  
  8. ------------------------------------------------------------------------------*/
  9.  
  10. #include "Types.r"
  11.  
  12. /* These define's are used in the MENU resources to disable specific
  13.    menu items. */
  14. #define AllItems    0b1111111111111111111111111111111    /* 31 flags */
  15. #define MenuItem1    0b00001
  16. #define MenuItem2    0b00010
  17. #define MenuItem3    0b00100
  18. #define MenuItem4    0b01000
  19. #define MenuItem5    0b10000
  20.  
  21. resource 'WIND' (128, "Sample Window") {
  22.     {64, 60, 314, 460},
  23.     documentProc, visible, noGoAway, 0x0, "Sample Window"
  24. };
  25.  
  26. resource 'DLOG' (128, "About Sample…") {
  27.     {66, 102, 224, 400},
  28.     dBoxProc, visible, noGoAway, 0x0, 128, ""
  29. };
  30.  
  31. resource 'DITL' (128) {
  32.      {
  33. /* 1 */ {130, 205, 150, 284},
  34.         button {
  35.             enabled,
  36.             "Continue"
  37.         };
  38. /* 2 */ {104, 144, 120, 296},                /* SourceLanguage Item */
  39.         staticText {
  40.             disabled,
  41.             ""
  42.         };
  43. /* 3 */ {88, 144, 105, 218},                /* Author Item */
  44.         staticText {
  45.             disabled,
  46.             ""
  47.         };
  48. /* 4 */ {8, 32, 26, 273},
  49.         staticText {
  50.             disabled,
  51.             "Macintosh Programmer's Workshop"
  52.         };
  53. /* 5 */ {32, 80, 50, 212},
  54.         staticText {
  55.             disabled,
  56.             "Sample Application"
  57.         };
  58. /* 6 */ {56, 16, 74, 281},
  59.         staticText {
  60.             enabled, "Copyright © 1985-1987 Apple Computer"
  61.         };
  62. /* 7 */ {88, 16, 104, 144},
  63.         staticText {
  64.             enabled, "Source Language:"
  65.         };
  66. /* 8 */ {104, 16, 120, 144},
  67.         staticText {
  68.             enabled, "Brought to you by:"
  69.         }
  70.     }
  71. };
  72.  
  73. resource 'MENU' (128, "Apple", preload) {
  74.     128, textMenuProc,
  75.     AllItems & ~MenuItem2,    /* Disable item #2 */
  76.     enabled, apple,
  77.     {
  78.         "About Sample…",
  79.             noicon, nokey, nomark, plain;
  80.         "-",
  81.             noicon, nokey, nomark, plain
  82.     }
  83. };
  84.  
  85. resource 'MENU' (129, "File", preload) {
  86.     129, textMenuProc,
  87.     allEnabled,
  88.     enabled, "File",
  89.     {
  90.         "Quit",
  91.             noicon, "Q", nomark, plain
  92.     }
  93. };
  94.  
  95. resource 'MENU' (130, "Edit", preload) {
  96.     130, textMenuProc,
  97.     AllItems & ~(MenuItem1 | MenuItem2),    /* Disable items #1 & #2 */
  98.     enabled, "Edit",
  99.      {
  100.         "Undo",
  101.             noicon, "Z", nomark, plain;
  102.         "-",
  103.             noicon, nokey, nomark, plain;
  104.         "Cut",
  105.             noicon, "X", nomark, plain;
  106.         "Copy",
  107.             noicon, "C", nomark, plain;
  108.         "Paste",
  109.             noicon, "V", nomark, plain;
  110.         "Clear",
  111.             noicon, nokey, nomark, plain
  112.     }
  113. };
  114.  
  115.  
  116. type 'ASMP' as 'STR ';
  117.  
  118. resource 'ASMP' (0) {
  119.     "Sample Assembly Language Application - Version 1.0"
  120. };
  121.  
  122. resource 'ICN#' (128) {
  123.     {    /* array: 2 elements */
  124.         /* [1] */
  125.         $"0000 0000 0000 0000 0000 0000 0000 0000"
  126.         $"0000 0000 0000 0000 0000 0000 0000 0000"
  127.         $"0000 1200 0000 5D00 0001 7080 0005 C040"
  128.         $"0017 0020 005C 0010 0170 0018 05C0 0078"
  129.         $"1700 01F0 5C00 07C8 7000 1F28 4000 7CA0"
  130.         $"4001 F280 6007 CA00 701F 2800 387C A000"
  131.         $"1DF2 8000 0FCA 0000 0728 0000 00A0 0000"
  132.         $"0080",
  133.         /* [2] */
  134.         $"0000 0000 0000 0000 0000 0000 0000 0000"
  135.         $"0000 0000 0000 0000 0000 0000 0000 0000"
  136.         $"0000 1200 0000 5E00 0001 7F00 0005 FF80"
  137.         $"0017 FFC0 005F FFE0 017F FFE0 05FF FF80"
  138.         $"17FF FE00 5FFF F800 7FFF E000 7FFF 8000"
  139.         $"3FFE 0000 1FF8 0000 0FE0 0000 0780 0000"
  140.         $"02"
  141.     }
  142. };
  143.  
  144. resource 'BNDL' (128) {
  145.     'ASMP',
  146.     0,
  147.     {
  148.         'ICN#',
  149.         {
  150.             0, 128
  151.         },
  152.         'FREF',
  153.         {
  154.             0, 128
  155.         }
  156.     }
  157. };
  158.  
  159. resource 'FREF' (128) {
  160.     'APPL',
  161.     0,
  162.     ""
  163. };
  164.